<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/page/share/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/style.css" />
</head>
<body>
	
	<table class="table">
	<html:form action="/control/medal/medalIssue.do?target=issueMedal" method="post">
						<tr class="table_header"><td>授予勋章</td><td>内容</td></tr>
						
						<c:if test="${user!=null}">
							<tr class= "row1">
								<td>用户名</td>
								<td><html:text property="username" value="${user.username}" readonly="true"></html:text></td>
							</tr>
							<tr class= "row1">
								<td>授予勋章</td>
								<td>
									<c:forEach items="${medals}" var="d" varStatus="i">
										<input type="checkbox"  name="medalcodes" value="${d.id}"
											<c:forEach items="${user.medals}" var="m">
												<c:if test="${m.id == d.id}">
												checked="checked" 
												</c:if>
											</c:forEach>
										>${d.name}<img alt="${d.name}" src="${d.path}"/> <br/>
									</c:forEach>
								</td>
							</tr>
						</c:if>
						
						<c:if test="${user==null}">
							<tr class= "row1">
								<td>用户名</td>
								<td>
									没有查询到该用户！
								</td>
							</tr>
							
						</c:if>
						
						
			<tr>
			<td><html:submit value="确定"></html:submit></td><td><html:reset value="重置"></html:reset></td>
			</tr>
	</html:form>					
	</table>

</body>
</html>